/******************************************************************************
 * HGE_Cursor.h - 
 * 
 * Copyright 2011-2016 Guangzhou Timetop Electronics Technology Co.,Ltd.
 * 
 * DESCRIPTION: - 
 *     -
 * modification history
 * 
 * 01a, 10sep2012, Mr. Huanbiao Xie  written
 *
 ******************************************************************************/
#include "HGE_Cursor.h"
//CSprite g_cursor;
HANDLE	CCursor::m_hThread;
DWORD CCursor::m_dwThreadID;
DWORD CCursor::m_dwIsRun;
CCursor::CCursor()
{
	m_hThread=INVALID_HANDLE_VALUE;
	m_dwThreadID=0;
	m_dwIsRun=0;
}
CCursor::~CCursor()
{

}
void CCursor::CreateCursor()
{
	m_dwIsRun=TRUE;
	m_hThread= CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)CCursorProc, NULL, 0, &m_dwThreadID);
	printf("@#:Create Thread:g_hSemThread == %d \n", m_dwThreadID);
}
DWORD CCursor::CCursorProc(LPVOID lpParameter)
{
	while(m_dwIsRun)
	{
		Sleep(33);
		g_receiver.ReadData();
		//LPOINT pt=g_receiver.GetCursorPoint(EM_RF_Master);
		////PrintLPt(g_receiver.GetCursorPoint(EM_RF_Master));
		//g_cursor.Update(IDD_CURSOR1_BMX,pt.lx,pt.ly,C_Pri_MemuUI_End, 128, ePalCursor, eLayMax,0);
		//FlushScreen();
	}
	ExitThread(0);
	return 0;
}
void CCursor::EixtCursor()
{
	m_dwIsRun=FALSE;
}



